/**
 * OSAmI: Open Source Ambient Intelligence
 * A simple discovery protocol (based on multicast communications) for constrained devices.
 * Copyright (C) Lionel Debroux 2006 (as a TER/Magistere M1 student in the LSR-IMAG-ADELE team, for a demo in the H-Omega project)
 * Copyright (C) Lionel Debroux 2010 (as an engineer in the LCIS-INPG-CTSYS team, for a pre-demo in the FR part of the OSAMI project)
 * Contact: osami-general@osami-commons.org
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation;
 * version 2.1 of the License.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Suite 500 Boston, MA 02110-1335 USA
 */

package org.osami.gateway.jennic.internal.message.parser;

/**
 * This interface defines the externally usable methods of devices, and several constant strings used by the other classes
 * of the same package. Having those defined in a single place makes it easier to change the format.
 */
public interface Constants {

    /**
     * String for the field separator in the discovery and event messages.
     */
    public static final String DEVICE_FIELD_SEPARATOR = "!";

    /**
     * Separator between key and value in a key-value pair.
     */
    public static final String DEVICE_EVENT_KV_SEPARATOR = "|";

    /**
     * Separator between key-value pairs.
     */
    public static final String DEVICE_EVENT_FIELD_SEPARATOR = ";";    

    /**
     * Separator between key and value in a key-value pair.
     */
    public static final String DEVICE_METADATA_KV_SEPARATOR = "|";

    /**
     * Separator between key-value pairs.
     */
    public static final String DEVICE_METADATA_FIELD_SEPARATOR = ";";

    /**
     * Magic + version number leading discovery and event messages.
     */
    public static final String DEVICE_PROTOCOL_VERSION = "O1";

    /**
     * Prefix string for a "Hello" discovery message.
     */
    public static final String DEVICE_HELLO_PREFIX = DEVICE_PROTOCOL_VERSION + "H"; // HELLO

    /**
     * Prefix string for a "Probe" discovery message.
     */
    public static final String DEVICE_PROBE_PREFIX = DEVICE_PROTOCOL_VERSION + "P"; // PROBE

    /**
     * Prefix string for a "Bye" discovery message.
     */
    public static final String DEVICE_BYE_PREFIX = DEVICE_PROTOCOL_VERSION + "B"; // BYE

    /**
     * Prefix string for a "Get metadata" (request) discovery message.
     */
    public static final String DEVICE_GETMETADATA_PREFIX = DEVICE_PROTOCOL_VERSION + "G"; // GETMETADATA

    /**
     * Prefix string for a "Metadata" (reply) discovery message.
     */
    public static final String DEVICE_METADATA_PREFIX = DEVICE_PROTOCOL_VERSION + "M"; // METADATA

    /**
     * Prefix string for an Event message.
     */
    public static final String DEVICE_EVENT_PREFIX = DEVICE_PROTOCOL_VERSION + "E"; // EVENT
}
